<template>
	<view class="content">
	
		<view class="text-area">
			<text class="title">{{title}}</text>
		</view>
		<view class="text-area">
			<navigator url="/pages/user/user" hover-class="navigator-hover">
				<!-- 该组件类似HTML中的<a>组件，但只能跳转本地页面。目标页面必须在pages.json中注册。 -->
				 <button type="default" style="background-color: #F8F8F8;">用户页面</button>
			</navigator> 
		</view>
		<view class="text-area">
			<navigator url="/pages/case/index" hover-class="navigator-hover">
				<!-- 该组件类似HTML中的<a>组件，但只能跳转本地页面。目标页面必须在pages.json中注册。 -->
				 <button type="default" style="background-color: #F8F8F8;">评测页面</button>
			</navigator> 
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello，欢迎来到这里关注健康',
				userid :0
			}
		},
		onLoad() {
           this.userid=uni.getStorageSync("uservo")
		   console.log(this.userid)
		   if(this.userid ==0 ||this.userid == ''){
			   uni.reLaunch({
			   		url: '/pages/login/index',
			   	}); 
		   }
		},
		methods: {

		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
